<!--Copyright (C) Kherty.  All rights reserved.-->
<ResourceDictionary
    x:Class ="OpenLS.Chart.UI.ShapedObjectResources"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:chartui="clr-namespace:OpenLS.Chart.UI"
    xmlns:drawing2="clr-namespace:OpenLS.Drawing.UI;assembly=OpenLS.Drawing.UI"
    xmlns:Internals="clr-namespace:OpenLS.Chart.UI.Internals"
    xmlns:Internals1="clr-namespace:OpenLS.Drawing.UI.Internals;assembly=OpenLS.Drawing.UI">

    <Style x:Key="ShapedElementStyle" TargetType="{x:Type Shape}" BasedOn="{x:Static chartui:ChartHelperResources.FocusableByClickStyle}">
        <Setter Property="Shape.Fill">
            <Setter.Value>
                <MultiBinding Converter="{x:Static Internals:ChartConverters.FillPropertiesToBrushConverter}">
                    <Binding RelativeSource="{RelativeSource Self}" Path="(drawing2:DrawingElement.ShapeProperties).FillProperties"/>
                    <Binding RelativeSource="{RelativeSource Self}" Path="(drawing2:DrawingElement.Theme).ColorScheme"/>
                </MultiBinding>
            </Setter.Value>
        </Setter>
        <Setter Property="Shape.Stroke">
            <Setter.Value>
                <MultiBinding Converter="{x:Static  Internals:ChartConverters.LineFillPropertiesSchemeIndexToBrushConverter}">
                    <Binding RelativeSource="{RelativeSource Self}" Path="(drawing2:DrawingElement.ShapeProperties).LineProperties.LineFillProperties"/>
                    <Binding RelativeSource="{RelativeSource Self}" Path="(drawing2:DrawingElement.ColorScheme)"/>
                </MultiBinding>
            </Setter.Value>
        </Setter>
        <Setter Property="StrokeDashArray" Value="{Binding RelativeSource={RelativeSource Self}, Path=(drawing2:DrawingElement.ShapeProperties).LineProperties.LineDashProperties, Converter={x:Static Internals:ChartConverters.LineDashPropertiesToStrokeDashArrayConverter}}"/>
        <Setter Property="StrokeEndLineCap" Value="{Binding RelativeSource={RelativeSource Self} , Path=(drawing2:DrawingElement.ShapeProperties).LineProperties.LineCap, Converter={x:Static Internals1:DrawingConverters.LineCapConverter}}"/>
        <Setter Property="StrokeStartLineCap" Value="{Binding RelativeSource={RelativeSource Self} ,Path=(drawing2:DrawingElement.ShapeProperties).LineProperties.LineCap, Converter={x:Static Internals1:DrawingConverters.LineCapConverter}}"/>
        <Setter Property="StrokeThickness" Value="{Binding RelativeSource={RelativeSource Self} ,Path=(drawing2:DrawingElement.ShapeProperties).LineProperties.Width, FallbackValue=0}"/>
    </Style>
    <Style x:Key="ShapedObjectStyle" TargetType="{x:Type Shape}" BasedOn="{x:Static chartui:ShapedObjectResources.ShapedElementStyle}">
        <Setter Property="drawing2:DrawingElement.ShapeProperties" Value="{Binding ShapeProperties}" />
    </Style>

    <Style x:Key="ShapedObjectStyleobsolete" TargetType="{x:Type Shape}" BasedOn="{x:Static chartui:ChartHelperResources.FocusableByClickStyle}">
        <Setter Property="Shape.Fill">
            <Setter.Value>
                <MultiBinding Converter="{x:Static Internals:ChartConverters.FillPropertiesToBrushConverter}">
                    <Binding Path="ShapeProperties.FillProperties"/>
                    <Binding RelativeSource="{RelativeSource Self}" Path="(drawing2:DrawingElement.Theme).ColorScheme"/>
                </MultiBinding>
            </Setter.Value>
        </Setter>
        <Setter Property="Shape.Stroke">
            <Setter.Value>
                <MultiBinding Converter="{x:Static  Internals:ChartConverters.LineFillPropertiesSchemeIndexToBrushConverter}">
                    <Binding Path="ShapeProperties.LineProperties.LineFillProperties"/>
                    <Binding RelativeSource="{RelativeSource Self}" Path="(drawing2:DrawingElement.ColorScheme)"/>
                </MultiBinding>
            </Setter.Value>
        </Setter>
        <Setter Property="StrokeDashArray" Value="{Binding ShapeProperties.LineProperties.LineDashProperties, Converter={x:Static Internals:ChartConverters.LineDashPropertiesToStrokeDashArrayConverter}}"/>
        <Setter Property="StrokeEndLineCap" Value="{Binding ShapeProperties.LineProperties.LineCap, Converter={x:Static Internals1:DrawingConverters.LineCapConverter}}"/>
        <Setter Property="StrokeStartLineCap" Value="{Binding ShapeProperties.LineProperties.LineCap, Converter={x:Static Internals1:DrawingConverters.LineCapConverter}}"/>
        <Setter Property="StrokeThickness" Value="{Binding ShapeProperties.LineProperties.Width, FallbackValue=0}"/>
    </Style>


</ResourceDictionary>